﻿@using VirtualPress.Infrastructure.Entities.Entity;
@{
    string idStr = Request.QueryString["id"];
    List<FriendLink> links = null;
    if (String.IsNullOrEmpty(idStr))
    {
        idStr = Request.RawUrl.Substring(Request.RawUrl.LastIndexOf('/') + 1);
        if (!String.IsNullOrEmpty(idStr))
        {
            int id = 0;
            if(Int32.TryParse(idStr,out id))
            {
                links = new FriendLink().FindAll(c => c.RelationId == id && c.RelationType==1);
            }
        }
    }
    }
<div class="friendlinktop">
    <i class="icon-globe"></i> 友情连接
    <hr class="flline" />
</div>
<div class="flinks">
    @if (links != null && links.Any())
    {
        foreach (var item in links)
        { 
            <div class="nowraplink"><a href="@item.URL" target="_blank" title="@item.Title">@item.Title</a></div>
        }
    }
</div>
